<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui">

    <ui:composition template="/financier.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.EditComptesTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:form>
                <h:panelGrid columns="3">

                    <h:outputLabel value="#{bundle.CreateComptesLabel_nomCompte}" for="nomCompte" />
                    <p:inputText id="nomCompte" required="true" value="#{comptesController.selected.nomCompte}" title="#{bundle.CreateComptesTitle_nomCompte}" />
                    <p:message for="nomCompte"/>
                    <h:outputLabel value="#{bundle.CreateComptesLabel_banque}" for="banque" />
                    <p:selectOneMenu id="banque" value="#{comptesController.selected.banque}" title="#{bundle.CreateComptesTitle_banque}" >
                        <f:selectItems value="#{banqueController.itemsAvailableSelectOne}"/>
                    </p:selectOneMenu>
                    <p:message for="banque"/>
                    <h:outputLabel value="#{bundle.CreateComptesLabel_soldeCompte}" for="soldeCompte" />
                    <p:inputText id="soldeCompte" value="#{comptesController.selected.soldeCompte}" title="#{bundle.CreateComptesTitle_soldeCompte}" />
                    <p:message for="soldeCompte"/>
                    <h:outputLabel value="#{bundle.CreateComptesLabel_typeCompte}" for="typeCompte" />
                    <p:selectOneMenu id="typeCompte" value="#{comptesController.selected.typeCompte}" title="#{bundle.CreateComptesTitle_typeCompte}" >
                        <f:selectItems value="#{typeCompteController.itemsAvailableSelectOne}"/>
                    </p:selectOneMenu>
                    <p:message for="typeCompte"/>
                    <h:outputLabel value="#{bundle.CreateComptesLabel_description}" for="description" />
                    <p:inputText id="description" value="#{comptesController.selected.description}" title="#{bundle.CreateComptesTitle_description}" />
                    <p:message for="description"/>
                    <h:outputLabel value="#{bundle.CreateComptesLabel_compteBancaire}" for="compteBancaire" />
                    <p:selectBooleanCheckbox id="compteBancaire" value="#{comptesController.selected.compteBancaire}" title="#{bundle.CreateComptesTitle_compteBancaire}" />
                    <p:message for="compteBancaire"/>
                </h:panelGrid>
                <h:commandLink action="#{comptesController.update}" value="#{bundle.EditComptesSaveLink}"/>
                <br />
                <br />
                <h:commandLink action="View" value="#{bundle.EditComptesViewLink}" immediate="true"/>
                <br />
                <h:commandLink action="#{comptesController.prepareList}" value="#{bundle.EditComptesShowAllLink}" immediate="true"/>
            </h:form>
        </ui:define>
    </ui:composition>

</html>
